package models

import "time"

type ShGoodsCategory struct {
    Id int `gorm:"primaryKey;type:int unsigned;not null" json:"id"`
    ParentId int `gorm:"column:parent_id;type:int unsigned;not null;default:0" json:"parent_id"`
    Name string `gorm:"type:varchar(100);not null;default:""" json:"name"`
    Sort int `gorm:"type:int;not null;default:0" json:"sort"`
    IsShow int8 `gorm:"column:is_show;type:tinyint unsigned;not null;default:0" json:"is_show"`
    CreateTime time.Time `gorm:"column:create_time;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
    UpdateTime *time.Time `gorm:"column:update_time;type:datetime" json:"update_time"`
}

func (ShGoodsCategory) TableName() string {
    return "sh_goods_category"
}